package cn.wolfcode.mapper;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {


    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);

    List<Employee> selectForList(QueryObject qo);

    void insertRelation(@Param("empId") Long empId, @Param("roleIds") Long [] roleIds);

    void deleteRelation(Long id);

    Employee selectUserNameAndPassword(@Param("username") String username, @Param("password") String password);

    String checkPasswordById(Long id);

    List<String> selectByRoleId(Long id);

    Employee selectByUserName(String username);

    void updatepwd(@Param("id") Long id, @Param("password") String password);

    boolean selectStatusId(Long id);

    void updateStatus(@Param("id") Long id, @Param("s") boolean s);


    void resetpassword(Long id);

    void deleteAll(@Param("ids") Long[] ids);
}